home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 49 / Amiga Format CD49 (2000-01-17)(Future Publishing)(GB)(Track 1 of 3)[!][issue 2000-02].iso / -websites- / wirenet / files / thor26_api.lha / include / libraries / BBSRead.h next >
C/C++ Source or Header  |  1998-02-17  |  39KB  |  860 lines

  1. #ifndef LIBRARIES_BBSREAD_H
  2. #define LIBRARIES_BBSREAD_H
  3. /*
  4. **  $VER: BBSRead.h 6.1 (07.02.98)
  5. ** 
  6. **  BBSRead structures and definitions.
  7. **
  8. **  © Copyright 1995-1998 Ultima Thule Software
  9. **  All Rights Reserved.
  10. **
  11. **  Authors: Eivind Nordseth and Petter Nilsen
  12. */
  13.  
  14. #ifndef EXEC_TYPES_H
  15. #include <exec/types.h>
  16. #endif
  17. #ifndef EXEC_NODES_H
  18. #include <exec/nodes.h>
  19. #endif
  20. #ifndef EXEC_LISTS_H
  21. #include <exec/lists.h>
  22. #endif
  23. #ifndef LIBRARIES_BBSREADTAGS_H
  24. #include <libraries/BBSReadTags.h>
  25. #endif
  26.  
  27.  
  28. #define BBSREADNAME        "bbsread.library"
  29. #define BBSREADVERSION    6L
  30.  
  31. #define ENV_BBSDATAPATH        "THOR/BBSDataPath"
  32. #define ENV_THORPATH            "THOR/THORPath"
  33.  
  34.  
  35. /***********************************************************************
  36. *
  37. * Global config structures and definitions
  38. *
  39. */
  40.  
  41. struct ArcConfigItem
  42. {
  43.     struct Node ac_Node;
  44.     UWORD    sc_pad;
  45.     STRPTR ac_Name;            /* Name of this archiver                */
  46.     STRPTR ac_FindPatern;    /* Patern to identify this archiver    */
  47.     STRPTR ac_UnArcCmd;        /* Command to unarc an archive        */
  48.     STRPTR ac_ArcCmd;        /* Command to add to an archive                    */
  49.     ULONG  ac_OpenCnt;        /* Nr of types using this archiver. Private.    */
  50. };
  51.  
  52. struct GlobalConfig
  53. {
  54.     STRPTR gc_DnloadPath;        /* Path where downloaded files resides        */
  55.     STRPTR gc_UploadPath;        /* Path where files to upload resides        */
  56.     STRPTR gc_GlobalUserName;    /* Global user name.    (from key file)    */
  57.  
  58.     ULONG gc_Buffers;            /*    Number of buffers to use                */
  59.     ULONG gc_BufferSize;        /* Size of each buffer                        */
  60.  
  61.     STRPTR gc_Signature;        /* Global signature, could be a NULL pointer    */
  62.  
  63.     ULONG gc_KeepMsg;            /* Messages to keep in each conference                        */
  64.     ULONG gc_KeepTime;            /* Time (in seconds) to keep messages in conferences    */
  65.  
  66.     LONGBITS gc_Flags;    
  67.  
  68.     struct MinList *gc_AvailArc;    /* List of archivers    which can be used for (un)packing.    */
  69.  
  70.     STRPTR gc_XpkMethod;            /* What xpk method to use when packing                        */
  71.  
  72.     STRPTR gc_UserStreet;            /* User data from key file.        */
  73.     STRPTR gc_UserAddress;
  74.     STRPTR gc_UserCountry;
  75.     STRPTR gc_UserPhone;            /* User editable.                                */
  76.  
  77.     STRPTR gc_TmpDir;                /* Directory to use for temp files while packing    */
  78.     STRPTR gc_TagFile;                /* Global tag file. NULL-pointer, no tags                */
  79.     
  80.     ULONG gc_HazeLevel1;            /* Seconds to keep messages marked with hazelevel 1    */
  81.     ULONG gc_HazeLevel2;            /* Seconds to keep messages marked with hazelevel 2    */
  82.     ULONG gc_HazeLevel3;            /* Seconds to keep messages marked with hazelevel 3    */
  83.     
  84.     STRPTR gc_PGPCommand;            /* Command for pgp (Default is "(ENV:PGPPATH)pgp")                    */
  85.     STRPTR gc_PGPSignID;            /* Id to use when PGP signing messages. Default is '*'.            */ 
  86.  
  87.     STRPTR gc_ReplyString;            /* Reply string to use when a message is replied _and_ moved.    */
  88.  
  89.     STRPTR gc_StartupScript;        /* Arexx script to be run each time Thor is started.    */
  90.     STRPTR gc_QuitScript;            /* Arexx script to be run each time Thor is quited.    */
  91.  
  92.     STRPTR gc_BBSEnterScript;        /* Arexx script to be run each time a bbs is entered.        */
  93.     STRPTR gc_BBSLeaveScript;        /* Arexx script to be run each time a bbs is left.            */
  94.  
  95.     STRPTR gc_ConfEnterScript;        /* Arexx script to be run each time a conf is entered.    */
  96.     STRPTR gc_ConfLeaveScript;        /* Arexx script to be run each time a conf is left.        */
  97.     UBYTE  gc_QuoteChars[4];        /* String to use as quote chars in custom quote type.    */
  98.                                     /* Max length is 3. The string is NUL terminated.         */
  99. };
  100.  
  101. /*  GlobalConfig.gc_Flags  */
  102. #define GCF_IGNORE_KEEPMSG        (1<<0)    /* gc_KeepMsg is ignored. Messages won't     */
  103.                                         /*    be counted when packing conferences        */
  104. #define GCF_IGNORE_KEEPTIME        (1<<1)    /* gc_KeepTime is ignored.    Time won't be    */
  105.                                         /* checked when packing conferences                */
  106. #define GCF_RESET_EVENT_NR        (1<<2)    /* Reset event numbers when packing events.    */
  107. #define GCF_NO_XPK_METHOD        (1<<3)    /* Don't use any xpk method                        */
  108. #define GCF_FILE_SIGNATURE        (1<<4)    /* The gc_Signature field contains the path    */
  109.                                         /* and name of a file containing the signature.                                                */
  110. #define GCF_AUTO_XPK_PACK        (1<<5)    /* Automatically xpk pack all new messages     */
  111.                                         /* when are written to the database. NB: A xpk method must have been defined.        */
  112. #define GCF_FORCE_PACK_REWRITE    (1<<6)    /* Force a rewrite when packing conferences    */
  113. #define GCF_COMMAND_SIGNATURE    (1<<7)    /* The gc_Signature field contains the path    */
  114.                                         /* and name of a command. When the command is executed should the signature         */
  115.                                         /* contents be written to stdout. The template for the command is expected to be */    
  116.                                         /* BBSNAME/K,CONFNAME/K.                                                                             */
  117. #define GCF_ALWAYS_REPLY_STR    (1<<8)     /* Use reply string on all replies.             */
  118.  
  119.  
  120. /***********************************************************************
  121. *
  122. * BBSType structures and definitions
  123. *
  124. */
  125.  
  126. struct EventConfigItem
  127. {
  128.     struct MinNode ec_Node;
  129.     
  130.     ULONG    ec_Event;        /*    Identification of this event                                    */
  131.     ULONG *ec_NeedTags;        /* Pointer to TAG_END-terminated array of tags needed        */
  132.                             /* for this event    (NULL pointer -> no needed tags)            */
  133.     ULONG *ec_OptTags;        /* Pointer to TAG_END-terminated array of optional    tags    */
  134.                             /* for this event    (NULL pointer -> no optional tags)        */
  135.     ULONG    ec_Reserved;    /* Reserved for future expansion                                    */
  136. };
  137.  
  138.  
  139. /*  Structure holding BBS-type spesific data  */
  140.  
  141. struct TypeData
  142. {
  143.     STRPTR td_TypeName;            /* Name of BBS-type                                    */
  144.     STRPTR td_MsgParser;        /* Command for parsing grabs                        */
  145.     UWORD  td_LineLength;        /* Max length of lines in messages                */
  146.     UWORD  td_SubjectLength;    /* Max length of subjects                            */
  147.     UWORD  td_FileDescrLen;        /* Max length of short filedescription            */
  148.     UBYTE  td_CharSet;            /* Charset the grab from this BBS typr uses.    */
  149.                                 /* Se bellow for definitions                        */    
  150.     UBYTE    td_QuoteType;        /* Prefered quote type for this bbstype.         */
  151.                                 /* See below for definitions.                        */
  152.     LONGBITS td_AvailScrFlags;    /* Mask of flags script uses                        */
  153.     UWORD    td_FileNameLen;    /* Max length of filenames allowed                */
  154.     UWORD    td_pad2;
  155.     STRPTR   td_EventPacker;    /* Command for packing events                        */
  156.     STRPTR    td_EventArchiver;    /* Archiver to use when making packages        */
  157.  
  158.     struct MinList *td_AvailEvents;    /* List of struct EventConfigItem        */
  159.     
  160.     LONGBITS td_Flags;
  161.     STRPTR   td_AcceptPattern;    /* Pattern for accepting grabs for this bbstype */
  162.                                         /* NULL equals #?                                            */
  163.     STRPTR   td_InitMsgFile;    /* Command for initializing message files            */
  164.     STRPTR   td_ExtConfig;        /* Command for external configuration                        */
  165. };
  166.  
  167. /* Charsets defined */
  168. #define BRCS_ANY        0    /* Any charset, can't be used in BBSTypes.                    */
  169. #define BRCS_ISO        1    /* ISO Latin 1 charset.                                                */
  170. #define BRCS_IBN        2    /* IBM charset used in Norway. Same as IBM CodePage 865. */
  171. #define BRCS_SF7        3    /* 7-bit charset. Sweden and Finland.                            */
  172. #define BRCS_NO7        4    /* 7-bit charset. Norway.                                            */
  173. #define BRCS_DE7        5    /* 7-bit charset. Denmark.                */
  174. #define BRCS_US7        6    /* 7-bit charset. USA.                    */
  175. #define BRCS_UK7        7    /* 7-bit charset. United Kingdom.    */
  176. #define BRCS_IT7        8    /* 7-bit charset. Italia.                */
  177. #define BRCS_PO7        9    /* 7-bit charset. Portugal.            */
  178. #define BRCS_SP7        10    /* 7-bit charset. Espania.                */
  179. #define BRCS_GE7        11    /* 7-bit charset. Germany.                */
  180. #define BRCS_FR7        12    /* 7-bit charset. France.                                            */
  181. #define BRCS_IBM        13    /* IBM charset. Same as IBM CodePage 437.                        */
  182. #define BRCS_IBMM        14    /* IBM multinational charset. Same as IBM CodePage 850.     */
  183. #define BRCS_APPLE        15    /* Apple charset.                                                        */
  184. #define BRCS_NO_OF        15    /* Number of charset defined.        */
  185.  
  186.  
  187. /* Charset equivalents */
  188. #define BRCS_ISO8859.1        BRCS_ISO
  189.  
  190. #define BRCS_ISO_IR002        BRCS_US7
  191. #define BRCS_ISO_IR004        BRCS_UK7
  192. #define BRCS_ISO_IR010        BRCS_SF7
  193. #define BRCS_ISO_IR011        BRCS_SF7
  194. #define BRCS_ISO_IR015        BRCS_IT7
  195. #define BRCS_ISO_IR016        BRCS_PO7
  196. #define BRCS_ISO_IR017        BRCS_SP7
  197. #define BRCS_ISO_IR021        BRCS_GE7
  198. #define BRCS_ISO_IR060        BRCS_NO7
  199. #define BRCS_ISO_IR061        BRCS_NO7
  200. #define BRCS_ISO_IR069        BRCS_FR7
  201.  
  202. #define BRCS_IBM_CP437        BRCS_IBM
  203. #define BRCS_IBM_CP850        BRCS_IBMM
  204. #define BRCS_IBM_CP865        BRCS_IBN
  205.  
  206.  
  207. /*  TypeData.td_AvailScrFlags  */
  208. #define SF_NEWFILES        (1<<0)    /* Do newfiles scan every logon                */
  209. #define SF_AUTOPDNL        (1<<1)    /* Automaticaly download private files        */
  210. #define SF_AUTOLOGOFF    (1<<2)    /* Automaticaly logoff after all is done    */
  211. #define SF_USECOLORS    (1<<3)    /* Use colors on BBS                                */
  212. #define SF_ANSIMENUES    (1<<4)    /* Use ANSI menues                                */
  213. #define SF_BULLETINS    (1<<5)    /* Get new bulletins on every logon            */
  214.  
  215.  
  216. /*  TypeData.td_QuoteType, BBSData.bd_QuoteType, ConfData.cd_QuoteType  */
  217. #define QT_USE_SUPER 0 /* 
  218.     In TypeData.td_QuoteType: Same as QT_DEFAULT.
  219.     In BBSData.bd_QuoteType:  Use quotetype defined for the BBSType.      
  220.     In ConfData.cd_QuoteType: Use quotetype defined for the BBS.          */
  221. #define QT_NONE      1 /* No quoting.                                     */
  222. #define QT_DEFAULT   2 /* Default quote char. (">")                       */
  223. #define QT_DEF_SPACE 3 /* Default quote char pluss space. ("> ")          */
  224. #define QT_CUSTOM    4 /* Custom quote chars defined in QuoteChars field. */
  225. #define QT_INITIALS  5 /* Use initials as quote chars.                    */
  226.  
  227.  
  228. /* TypeData.td_Flags  */
  229. #define TDF_NO_NAME_CHECK        (1<<0)    /* Don't check BBSData->bd_UserName/            */
  230.                                         /* ConfData->cd_Alias when adding messages    */
  231. #define TDF_NO_ADDR_CHECK        (1<<1)    /* Don't check BBSData->bd_UserAddr when         */
  232.                                         /* adding messages                                     */
  233. #define TDF_SELECT_ADD_USER        (1<<2)    /* BBSType supports selectable user adding.    */
  234. #define TDF_ADD_USERS            (1<<3)    /* The parser for this eventtype adds users     */
  235.                                         /* to the user database by default. Used by ConfigBBS() when creatig new BBS'es.    */
  236. #define TDF_ABS_LINELENGTH        (1<<4)    /* The line length in messages from this bbs */
  237.                                         /* type is never longer than defined for the conf/bbs/bbsttype.                        */
  238. #define TDF_MULTIPLE_CONFS        (1<<5)    /* BBSType supports "conf1,conf2,...,confn"    */
  239.                                         /* in BREV_Conference tag.                         */
  240. #define TDF_MULTIPLE_TO            (1<<6)    /* BBSType supports "to1,to2,...,ton" in         */
  241.                                         /* BREV_ToName and/or BREV_ToAddr. If both BREV_ToName and BREV_ToAddr tags are    */
  242.                                         /* used must name x in BREV_ToName correspond to address x in BREV_ToAddr.            */
  243. #define TDF_REFLOW_QUOTING        (1<<7)    /* Reflow quoting should be on as default     */
  244.                                         /* when answering messages.                         */
  245. #define TDF_GLOBAL_REPLIES        (1<<8)    /* BRMSG_MsgID or BRMSG_OrginalNr is globaly */
  246.                                         /* unique and can be used when repling messages to another conference than the     */
  247.                                         /* orginal.    See BREV_RefConference tag.                                                        */
  248. #define TDF_NAME_REPLIES        (1<<9)    /* It is possible to reply messages to         */
  249.                                         /* another user than the author of the orginal message.                                    */
  250. #define TDF_REPLY_SUBJ_PREFIX    (1<<10)    /* Use "Re: " as subject prefix on replies.    */
  251. #define TDF_EVENTS_HANDELED        (1<<11)    /* The library shouldn't ask if packed         */
  252.                                         /* events should be deleted when parsing. This is handled by the event                 */
  253.                                         /* packer/parser.                                                                                        */
  254. #define TDF_SUPPORTS_ENCODE_8BIT_MAIL    (1<<12)    /* Supports encoding of 8-bit         */
  255.                                                 /* messages only in mail conferences.                                                             */
  256. #define TDF_SUPPORTS_ENCODE_8BIT_MSGS    (1<<13)    /* Supports encoding of 8-bit         */
  257.                                                 /* messages in public conferences.                                                                 */
  258. #define TDF_SUPPORTS_MULTIPLE_ATTACHMENTS    (1<<14) /* Supports multiple attachments */
  259.  
  260.  
  261. /*  Structure used in List returned by GetTypeList  */
  262.  
  263. struct TypeListItem
  264. {
  265.     struct Node tl_Node;            /* Caller is free to use nl_Name        */
  266.     WORD        tl_pad;
  267.     APTR        tl_Link;            /* Private!!!!!!!!                                    */
  268.     APTR        tl_UserData;    /* For use by the caller; no restrictions!     */
  269.  
  270.     struct TypeData *tl_Data;    /* Pointer to the Type data                        */
  271. };
  272.  
  273.  
  274. /***********************************************************************
  275. *
  276. * BBS structures and definitions
  277. *
  278. */
  279.  
  280. /*  Structure holding user modifiable BBS data  */
  281.  
  282. struct BBSData
  283. {
  284.     STRPTR bd_Name;            /* Name of BBS                                                                */
  285.     STRPTR bd_GrabName;        /* Name of grabfile (without extension) or with wildcards    */
  286.     STRPTR bd_BBSType;        /* Type of BBS, used when splitting grabs and scripting        */
  287.     STRPTR bd_UserName;        /* The name the user is registered as                            */
  288.     STRPTR bd_Signature;    /* Signature to use on this BBS, could be a NULL-pointer    */
  289.  
  290.     UWORD  bd_LineLength;    /* Max linelength in messages. Overrides TypeData if >0                */
  291.     UBYTE  bd_CharSet;        /* Charset for the grab from this BBS uses. Overrides                    */
  292.                             /* TypeData if != BRCS_ANY                                                        */
  293.     UBYTE  bd_QuoteType;    /* Prefered quite type for this bbs. See above for definitions.    */
  294.  
  295.     LONGBITS bd_ScrFlags;    /* Flags for script (for definitions se TypeData)    */
  296.     LONGBITS bd_Flags;        /* Flags for this BBS                                        */
  297.  
  298.     ULONG  bd_KeepMsg;        /* Messages to keep in each conference                        */
  299.     ULONG  bd_KeepTime;        /* Time (in seconds) to keep messages in conferences    */
  300.  
  301.     STRPTR bd_EMailAddr;    /* The address the user has on the bbs                        */
  302.     STRPTR bd_XpkMethod;    /* What xpk method to use when packing this bbs            */
  303.  
  304.     STRPTR bd_UserStreet;    /* User data to override GlobalConfig        */
  305.     STRPTR bd_UserAddress;  /* NULL equals to value in GlobalConfig    */
  306.     STRPTR bd_UserCountry;
  307.     STRPTR bd_UserPhone;
  308.     STRPTR bd_Alias;        /* Alias used on this BBS. NULL-pointer, no alias    */
  309.                             /* This alias will only be used in conferences         */
  310.                             /* marked with CDF_ALIAS.                                             */
  311.     STRPTR bd_DnloadPath;    /* Dnloadpath for this BBS. Overrides global settings        */
  312.     STRPTR bd_TagFile;        /* Tagfile to use on this BBS. NULL-pointer, use global    */
  313.     STRPTR bd_EventArchiver;/* Archiver to use when packing the events from this BBS    */
  314.                             /* Overrides the setting in the BBSType if non NULL.        */
  315.     STRPTR bd_ReplyPacket;    /* File name of eventual reply packet. Is expected to be */
  316.                             /* relative to the defined upload dir for this bbs.        */
  317.     STRPTR bd_UploadPath;    /* Upload path for this BBS. Overrides global settings     */
  318.     STRPTR bd_ReplyString;    /* Reply string to use when a message is replied _and_     */
  319.                             /* moved. NULL means: Use global reply string.                 */
  320.     STRPTR bd_BBSEnterScript;    /* Arexx script to be run each time this bbs is         */
  321.                                 /* entered. Overrides global setting.                        */
  322.     STRPTR bd_BBSLeaveScript;    /* Arexx script to be run each time this bbs is left.    */
  323.                                 /* Overrides global setting.                                    */
  324.     STRPTR bd_ConfEnterScript;    /* Arexx script to be run each time a conference on     */
  325.                                 /* this bbs is entered. Overrides global setting.        */
  326.     STRPTR bd_ConfLeaveScript;    /* Arexx script to be run each time a conference on     */
  327.                                 /* this bbs is left. Overrides global setting.            */
  328.     UBYTE  bd_QuoteChars[4];    /* String to use as quote chars in custom quote type. */
  329.                                 /* Max length is 3. The string is NUL terminated.        */
  330. };
  331.  
  332. /*  BBSData.bd_Flags  */
  333. #define BDF_GLOBAL_KEEPMSG        (1<<0)    /* Use global KeepMsg for this BBS            */
  334. #define BDF_GLOBAL_KEEPTIME        (1<<1)    /* Use global KeepTime for this BBS            */
  335. #define BDF_IGNORE_KEEPMSG        (1<<2)    /* bd_KeepMsg is ignored. Messages won't     */
  336.                                         /* be counted when packing conferences        */
  337. #define BDF_IGNORE_KEEPTIME        (1<<3)    /* bd_KeepTime is ignored.    Time won't be    */
  338.                                         /* checked when packing conferences            */
  339. #define BDF_NO_XPK_METHOD        (1<<4)    /* Don't use any xpk method on this bbs    */
  340.  
  341. /*    This flag is used to show that the events for this bbs has changed since last        *
  342.  *    call to MakeEventPackage(). It is maintained by the library, and should normally    *
  343.  *    not be set or cleard by other. A successfull call to MakeEventPackage() will        *
  344.  *    clear the flag.                                                                                        */
  345. #define BDF_EVENTS_CHANGED        (1<<5)    
  346. #define BDF_NO_SIGNATURE        (1<<6)    /* Don't use signatures on this bbs                */
  347. #define BDF_MARK_OWN_MSGS        (1<<7)    /* Also mark messages from user when adding     */
  348.                                         /* messages    with the WBRMSG_MarkMessage tag    */
  349. #define BDF_NO_TAGS                (1<<8)    /* Don't use tags on this bbs                        */
  350. #define BDF_ADD_USERS            (1<<9)    /* The parser for this bbs should add users     */
  351.                                         /* to the database if it supports it.             */
  352. #define BDF_FILE_SIGNATURE        (1<<10)    /* The bd_Signature field contains the path    */
  353.                                         /* and name of a file containing the signature.                                                */
  354. #define BDF_AUTO_XPK_PACK        (1<<11)    /* Automatically xpk pack new messages when    */
  355.                                         /* they are written to this bbs. NB: A xpk method must have been defined.            */
  356. #define BDF_NO_AUTO_XPK_PACK    (1<<12)    /* No automatically xpk packing on this bbs.    */
  357.                                         /* Overrides global flags for auto xpk packing.                                                */
  358. #define BDF_COMMAND_SIGNATURE    (1<<13)    /* The bd_Signature field contains the path    */
  359.                                         /* and name of a command. When the command is executed should the signature         */
  360.                                         /* contents be written to stdout. The template for the command is expected to be */    
  361.                                         /* BBSNAME/K,CONFNAME/K.                                                                             */
  362. #define BDF_REFLOW_QUOTING        (1<<14)    /* Reflow quoting should be on as default     */
  363.                                         /* when answering messages. This flag should only be considered when                 */
  364.                                         /* bd_QuoteType is != QT_USE_SUPER.                                                                */
  365. #define BDF_ALWAYS_REPLY_STR    (1<<15)    /* Use reply string on all replies. This         */
  366.                                         /* flag should only be considered when bd_ReplyString is non NULL.                    */
  367. #define BDF_NO_REPLY_STR        (1<<16)    /* Don't use reply strings on this bbs.         */
  368.                                         /* Overrides the setting of bd_ReplyString.    */
  369. #define BDF_GLOBAL_REPLY_STR    (1<<17)    /* Use global reply string settings.                        */
  370.                                         /* Overrides all other bbs reply string settings.                                                        */
  371. #define BDF_NO_BBS_ENTER_SCR    (1<<18)    /* Don't use a bbs enter script on this bbs.                */
  372. #define BDF_NO_BBS_LEAVE_SCR    (1<<19)    /* Don't use a bbs leave script on this bbs.             */
  373. #define BDF_NO_CONF_ENTER_SCR    (1<<20)    /* Don't use a conference enter script on this bbs.    */
  374. #define BDF_NO_CONF_LEAVE_SCR    (1<<21)    /* Don't use a conference leave script on this bbs.    */
  375. #define BDF_ENCODE_8BIT_MAIL    (1<<22) /* Encode 8 bits messages in mail conferences. Only     */
  376.                                         /* appliable when the TDF_SUPPORTS_ENCODE_8BIT_MAIL flag is set for the bbstype.                */
  377. #define BDF_ENCODE_8BIT_MSGS    (1<<23) /* Encode 8 bits messages in public conferences. Only */
  378.                                         /* appliable when the TDF_SUPPORTS_ENCODE_8BIT_MSGS flag is set for the bbstype.                */
  379.  
  380.  
  381. /*  Structure holding BBS data maintained by the library */
  382.  
  383. struct BBSInternal
  384. {
  385.     ULONG bi_FirstEvent;    /* First event for this BBS                                */
  386.     ULONG bi_LastEvent;    /* Last event for this BBS                                    */
  387.     ULONG bi_NumEvents;    /* Number of active events (not deleted or done)    */
  388.  
  389.     ULONG bi_FirstUser;    /* First user in userfile                    */
  390.     ULONG bi_LastUser;    /* Last user in userfile                    */
  391.     ULONG bi_NumUsers;    /* Number of active users in userfile    */
  392.  
  393.     ULONG bi_FirstKill;    /* First kill in killfile                    */
  394.     ULONG bi_LastKill;    /* Number of last kill in killfile         */
  395.     ULONG bi_NumKills;    /* Number of active kills in killfile    */
  396.  
  397.     ULONG bi_SumMarked;    /* Number of marked messages on this system                    */
  398.                         /* This field should be regarded as a BOOL until you         */
  399.                         /* have obtained a conference list for the bbs.                */
  400.                         /* This field will only be updated during UpdateStruct()    */
  401.     ULONG bi_SumM2User;    /* Number of marked messages on this system to the user        */
  402.                         /* This field should be regarded as a BOOL until you         */
  403.                         /* have obtained a conference list for the bbs.                */
  404.                         /* This field will only be updated during UpdateStruct()    */
  405.     ULONG bi_SumQueued;    /* Number of queued messages on this system.                 */
  406.                         /* This field should be regarded as a BOOL until you         */
  407.                         /* have obtained a conference list for the bbs.                */
  408.                         /* This field will only be updated during UpdateStruct()    */
  409. };
  410.  
  411.  
  412. /*  Structure used in List returned by GetBBSList  */
  413.  
  414. struct BBSListItem
  415. {
  416.     struct Node bl_Node;    /* Caller is free to use nl_Name        */
  417.     WORD bl_pad;
  418.     APTR bl_Link;            /* Private!!!!!!!!                                    */
  419.     APTR bl_UserData;        /* For use by the caller; no restrictions!     */
  420.  
  421.     struct BBSData     *bl_Data;        /* Pointer to the BBS data                    */
  422.     struct BBSInternal *bl_Internal;    /* Pointer to public internal data        */
  423.  
  424.     STRPTR bl_BBSPath;    /* Path to the data directory for this BBS    */
  425.                                 /* Used for textfiles. Ends with a '/'            */
  426.     ULONG  bl_ChangeCnt;    /* Private!!!!!!!!                                    */
  427. };
  428.  
  429.  
  430. /***********************************************************************
  431. *
  432. * Conference structures and definitions
  433. *
  434. */
  435.  
  436. /*  Structure holding general conference data  */
  437.  
  438. struct ConfData
  439. {
  440.     STRPTR    cd_Name;            /* Name of Conference                */
  441.     ULONG    cd_KeepMsg;            /* Max number of messages to keep            */
  442.     ULONG    cd_KeepTime;        /* Oldest msg to keep (time in seconds)                    */
  443.     STRPTR    cd_Signature;        /* Signature for conference, could be a NULL-pointer    */
  444.     STRPTR    cd_Alias;            /* Alias used in conference, NULL pointer, no alias        */
  445.     LONG    cd_BBSConfNr;        /* The internal number a conference has on the BBS            */
  446.     UWORD    cd_LineLength;        /* Max linelength in messages. Overrides BBSData if > 0    */
  447.     UBYTE    cd_CharSet;            /* Charset for the grab from this conf. Overrides            */
  448.                                 /* BBSData if != BRCS_ANY                                            */
  449.     UBYTE    cd_QuoteType;        /* Prefered quite type for this conf. See above for         */
  450.                                 /* definitions.                                                        */
  451.     LONGBITS cd_Flags;    
  452.  
  453.     STRPTR    cd_XpkMethod;        /* What xpk method to use when packing this conference            */
  454.     STRPTR    cd_TagFile;            /* Tagfile to use in this conf. NULL-pointer, use bbs                */
  455.     STRPTR    cd_EMailAddr;        /* The Email address the user has in this conference. For use    */
  456.                                 /* on bbses where the user is member of more than one net.        */
  457.     STRPTR    cd_ReplyString;        /* Reply string to use when a message is replied _and_            */
  458.                                 /* moved. NULL means: Use bbs reply string.                         */
  459.     STRPTR    cd_ConfEnterScript;    /* Arexx script to be run each time this conference     */
  460.                                 /* is entered. Overrides bbs setting.                        */
  461.     STRPTR    cd_ConfLeaveScript;    /* Arexx script to be run each time this conference     */
  462.                                 /* is left. Overrides bbs setting.                            */
  463.     UBYTE    cd_QuoteChars[4];    /* String to use as quote chars in custom quote type. */
  464.                                 /* Max length is 3. The string is NUL terminated.        */
  465.     UBYTE    cd_ConfNetType;        /* States which type of net the conference is on. To     */
  466.                                 /* be used on bbses of bbstypes which support serveral nettypes. Should only     */
  467.                                 /* be set by parser/packer for the bbstype. Se below for defines.                    */
  468.     UBYTE    cd_reserved[3];
  469.     ULONG    cd_ExtraFlags;        /* Extra flags */
  470.     ULONG    cd_HighMark;        /* Number on the remote system/server of the last message/header */
  471.                                 /* downloaded in this conference */
  472. };
  473.  
  474.  
  475. /*  ConfData.cd_Flags  */
  476.  
  477. #define CDF_MEMBER_OF            (1<<0)    /* Member of this conference    */
  478. #define CDF_MAIL                (1<<1)    /* Mail conference                */
  479. #define CDF_READ_ONLY            (1<<2)    /* Read only conference            */
  480. #define CDF_COMPULSORY            (1<<3)    /* Compulsory conference        */
  481. #define CDF_FILE_INFO            (1<<4)    /* File info conference            */
  482. #define CDF_USER_INFO            (1<<5)    /* User info conference            */
  483. #define CDF_PRIVATE_ALLOWED        (1<<6)    /* Private messages allowed    */
  484. #define CDF_ENTER_ONLY_TO_ALL    (1<<7)    /* Enter only allowed to ALL    */
  485. #define CDF_ALIAS                (1<<8)    /* Alias conference                */
  486. #define CDF_BBS_KEEPMSG            (1<<9)    /* Use BBS KeepMsg for this Conf        */
  487. #define CDF_BBS_KEEPTIME        (1<<10)    /* Use BBS KeepTime for this Conf    */
  488. #define CDF_IGNORE_KEEPMSG        (1<<11)    /* cd_KeepMsg is ignored. Messages won't     */
  489.                                         /*    be counted when packing conference        */
  490. #define CDF_IGNORE_KEEPTIME        (1<<12)    /* cd_KeepTime is ignored.    Time won't be    */
  491.                                         /* checked when packing conference            */
  492. #define CDF_NO_XPK_METHOD        (1<<13)    /* Don't use any xpk method on this conf    */
  493. #define CDF_NO_SIGNATURE        (1<<14)    /* Don't use any signature in this conf    */
  494. #define CDF_NOT_ON_BBS            (1<<15)    /* This conference is not on the BBS        */
  495. #define CDF_NO_TAGS                (1<<16)    /* Don't use message tags in this conf        */
  496. #define CDF_REPLY_ONLY_TO_ALL     (1<<17)    /* Replies should be adresses to all        */
  497.                                         /* If both CDF_REPLY_ONLY_TO_ALL and CDF_ENTER_ONLY_TO_ALL flags is set are     */
  498.                                         /* all messages in the conference addressed to all.                                    */
  499. #define CDF_NO_LINEWRAP_DISPLAY (1<<18) /* Don't line wrap messages in this         */
  500.                                         /* conference when they are displayed. Should be used for conferences with     */
  501.                                         /* messages with ansi-codes. Typical conferences are conferences which are     */
  502.                                         /* used to display bulletins from the bbs.                                                */
  503. #define CDF_FILE_SIGNATURE        (1<<19)    /* The cd_Signature field contains the     */
  504.                                         /* path and name of a file containing the signature.                                    */
  505. #define CDF_AUTO_XPK_PACK        (1<<20)    /* Automatically xpk pack new messages     */
  506.                                         /* when they are written to this conference. NB: A xpk method must have been    */
  507.                                         /* defined.            */
  508. #define CDF_NO_AUTO_XPK_PACK    (1<<21)    /* No automatically xpk packing in this     */
  509.                                         /* conference. Overrides bbs og global flags for auto xpk packing.                 */
  510. #define CDF_MARK_OWN_MSGS        (1<<22)    /* Also mark messages from user when         */
  511.                                         /* adding messages with the WBRMSG_MarkMessage tag in this conference.            */
  512. #define CDF_COMMAND_SIGNATURE    (1<<23)    /* The cd_Signature field contains the path    */
  513.                                         /* and name of a command. When the command is executed should the signature         */
  514.                                         /* contents be written to stdout. The template for the command is expected to be */    
  515.                                         /* BBSNAME/K,CONFNAME/K.                                                                             */
  516. #define CDF_REFLOW_QUOTING         (1<<24)    /* Reflow quoting should be on as default     */
  517.                                         /* when answering messages. This flag should only be considered when                 */
  518.                                         /* cd_QuoteType is != QT_USE_SUPER.                                                                */
  519. #define CDF_ALWAYS_REPLY_STR    (1<<25)    /* Use reply string on all replies. This         */
  520.                                         /* flag should only be considered when cd_ReplyString is non NULL.                   */
  521. #define CDF_NO_REPLY_STR        (1<<26)    /* Don't use reply strings in this conf.         */
  522.                                         /* Overrides the setting of cd_ReplyString.    */
  523. #define CDF_BBS_REPLY_STR        (1<<27)    /* Use bbs reply string settings.                 */
  524.                                         /* Overrides all other conference reply string settings.                                    */
  525. #define CDF_NO_CONF_ENTER_SCR    (1<<28)    /* Don't use a conference enter script in this conference.    */
  526. #define CDF_NO_CONF_LEAVE_SCR    (1<<29)    /* Don't use a conference leave script on this conference.    */
  527. #define CDF_FORCE_PACK_REWRITE    (1<<30)    /* Force a rewrite next time this conference */
  528.                                         /* is packed. If the packing succeed, the flag will be cleared.                        */
  529. #define CDF_ATTACH_FORBIDDEN    (1<<31) /* User may not attach files in this conference.    */
  530.  
  531. /*  ConfData.cd_ExtraFlags  */
  532.  
  533. #define CDXF_ONLYHEADERS        (1<<0)    /* This conference can be used for only storing headers    */
  534.                                         /* and to request bodies on the user's request.            */
  535.  
  536. /*  ConfData.cd_ConfNetType  */ 
  537.  
  538. #define CDNT_NONET            0    /* This conference is a local conference.    This is the    */
  539.                                 /* default values for new conferences.                     */
  540. #define CDNT_FIDONET        1    /* This conference is a Fido net conference.                */
  541. #define CDNT_USENET            2    /* This conference is a usenet conference.                */
  542. #define CDNT_MAILFOLDER        3    /* This conference is a virtual mail folder                */
  543. #define CDNT_INFO            4    /* This conference is an information conference            */
  544.  
  545.  
  546. /*  Structure holding conference data maintained by the library */
  547.  
  548. struct ConfInternal
  549. {
  550.     ULONG ci_FirstMsg;        /* First message in conference                    */
  551.     ULONG ci_LastMsg;        /* Last message in conference                        */
  552.     ULONG ci_NumMessages;    /*Number of active messages in conference    */
  553.     ULONG ci_MsgMarked;        /* Number of messages marked                        */
  554.     ULONG ci_Marked2User;    /* Number of marked messages to user            */
  555.     ULONG ci_NumQueued;        /* Number of queued messages with only headers        */
  556. };
  557.  
  558.  
  559. /*  Structure used in List returned by GetConfList  */
  560.  
  561. struct ConfListItem
  562. {
  563.     struct Node cl_Node;    /* Caller is free to use nl_Name        */
  564.     WORD cl_pad;
  565.     APTR cl_Link;            /* Private!!!!!!!!                                    */
  566.     APTR cl_UserData;        /* For use by the caller; no restrictions!    */
  567.     
  568.     struct ConfData     *cl_Data;        /* Pointer to the conference data    */
  569.     struct ConfInternal *cl_Internal;    /* Pointer to public internal data    */
  570.  
  571.     ULONG cl_ChangeCnt;    /* Private!!!!!!!!    */
  572. };
  573.  
  574.  
  575. /***********************************************************************
  576. *
  577. * File area structures and definitions
  578. *
  579. */
  580.  
  581. /*  Structure holding general file area data  */
  582.  
  583. struct FAreaData
  584. {
  585.     STRPTR ad_Name;        /* Name of file area                                */
  586. };
  587.  
  588.  
  589. /*  Structure holding file area data maintained by the library */
  590.  
  591. struct FAreaInternal
  592. {
  593.     ULONG ai_FirstFile;    /* Number of the first file in this area    */
  594.     ULONG ai_NumFiles;    /* Number of files in this area                 */
  595. };
  596.  
  597.  
  598. /*  Structure used in List returned by GetFAreaList  */
  599.  
  600. struct FAreaListItem
  601. {
  602.     struct Node al_Node;    /* Caller is free to use nl_Name                    */
  603.     WORD al_pad;
  604.     APTR al_Link;            /* Private!!!!!!!!                                    */
  605.     APTR al_UserData;        /* For use by the caller; no restrictions!    */
  606.     
  607.     struct FAreaData     *al_Data;        /* Pointer to the file area data        */
  608.     struct FAreaInternal *al_Internal;    /* Pointer to public internal data    */
  609.  
  610.     ULONG al_ChangeCnt;    /* Private!!!!!!!!                    */
  611. };
  612.  
  613.  
  614. /***********************************************************************
  615. *
  616. * Passive Conference list structures and definitions
  617. *
  618. */
  619.  
  620. struct PassConfListItem
  621. {
  622.     struct Node pl_Node;        /* Caller is free to use nl_Name                */
  623.     WORD pl_pad;
  624.  
  625.     STRPTR   pl_Name;            /* Must always be set.                                    */
  626.     STRPTR   pl_Description;/* NULL equals no available description            */
  627.     LONG     pl_BBSConfNr;    /* The internal number the conf has on the bbs    */
  628.     LONGBITS pl_Flags;        /* Same as CondData.cd_Data.                            */
  629. };
  630.  
  631. /***********************************************************************
  632. *
  633. * Attachment list structures and definitions
  634. *
  635. */
  636.  
  637. struct AttachmentItem
  638. {
  639.     struct Node ai_Node;        /* Caller is free to use nl_Name                */
  640.     WORD ai_pad;
  641.  
  642.     STRPTR    ai_Name;            /* Must always be set and contains the filename with full path    */
  643.     STRPTR    ai_Description;        /* NULL equals no available file comment/description            */
  644.     ULONG    ai_Filesize;        /* Filesize of the file    */
  645.     LONGBITS ai_Flags;            /* Flags. None defined yet.                            */
  646.     ULONG    ai_reserved[2];        /* Reserved for future use */
  647. };
  648.  
  649. /***********************************************************************
  650. *
  651. * Message, event, user, kill, file flags and definitions.
  652. *
  653. */
  654.  
  655. /*  Message flags (Returned by GBRMSG_Flags tag)  */
  656.  
  657. #define MDF_READ            (1<<0)    /* Message is read        */
  658. #define MDF_REPLIED            (1<<1)    /* Message is replied    */
  659. #define MDF_PRIVATE            (1<<2)    /* Message is private            */
  660. #define MDF_TO_USER            (1<<3)    /* Message is to the user        */
  661. #define MDF_FROM_USER        (1<<4)    /* Message is from the user    */
  662. #define MDF_DELETED            (1<<5)    /* Message is deleted                                 */
  663. #define MDF_UNRECOVERABLE    (1<<6)    /* Message is can not be undeleted                */
  664. #define MDF_KEEP            (1<<7)    /* Keep message. Message will not be deleted    */
  665.                                     /* during packing of conference                     */
  666. #define MDF_TO_ALL            (1<<8)    /* Message is to all (has no reciever)            */
  667. #define MDF_XPK_TEXT        (1<<9)    /* Message text is Xpk'ed (Private flag)        */
  668. #define MDF_MARKED            (1<<10)    /* Message is marked    (Private flag)                */
  669. #define MDF_URGENT            (1<<11)    /* Message is urgent                                    */
  670. #define MDF_IMPORTANT        (1<<12)    /* Message is important                                */
  671. #define MDF_SUPERMARKED        (1<<13) /* Message will not be unmarked as long as this flag is set.    */
  672.  
  673. #define MDF_BINARY_PARTS    (1<<14)    /* Message contains 1 or more BRMSG_BinaryPart tags    */
  674. #define MDF_TEXT_PARTS        (1<<15)    /* Message contains 1 or more BRMSG_TextPart tags        */
  675.                                     /* These two flags does also concern possible message parts.                                    */
  676.  
  677. #define MDF_MESSAGE_PARTS    (1<<16)    /* Message contains 1 or more BRMSG_MsgPart tags        */
  678. #define MDF_CONFIDENTIAL    (1<<17)    /* Message is confidential                                        */
  679. #define MDF_REFERENCED        (1<<18)    /* Message is referenced by some other component in the system,
  680.                                     and can not be purged before the flag is cleared. Normally, this
  681.                                     flag is only set with the EVE_FORWARDMSG and will be removed when
  682.                                     the event is purged. (Private flag) */
  683.  
  684. #define MDF_HAZE_BIT0        (1<<24)    /* Use MsgHazeLevel macro to extract haze     */
  685. #define MDF_HAZE_BIT1        (1<<25)  /* level from message flags.                        */
  686. #define MsgHazeLevel(msgflags) ((msgflags & (MDF_HAZE_BIT0 | MDF_HAZE_BIT1)) >> 24)
  687.  
  688. #define MDF_QUEUED            (1<<26)    /* Message is queued for future collection of the main body and header    */
  689. #define MDF_EMPTY_BODY        (1<<27)    /* Message consists of only a header and no full body */
  690.  
  691.  
  692. /*  Event flags (Returned by RBREV_Flags tag)  */
  693. #define EDF_DELETED            (1<<0)    /* Event is deleted    */
  694. #define EDF_PACKED            (1<<1)    /* Event is packed    */
  695. #define EDF_DONE            (1<<2)    /* Event is done                                */
  696. #define EDF_ERROR            (1<<3)    /* Error performing this event            */
  697. #define EDF_UNRECOVERABLE    (1<<4)    /* Event can not be undeleted                                                    */
  698. #define EDF_FREEZE            (1<<5)    /* Event is frozen. Will not be done as long as this flag is set.    */
  699.  
  700.  
  701. /*  Event types supported   */
  702.  
  703. #define EVE_ENTERMSG        0L        /* Enter message        */
  704. #define EVE_REPLYMSG        1L        /* Reply message        */
  705. #define EVE_JOINCONF        2L        /* Join conference    */
  706. #define EVE_RESIGNCONF        3L        /* Resign conference    */
  707. #define EVE_DOWNLOAD        4L        /* Download file        */
  708. #define EVE_UPLOAD            5L        /* Upload file            */
  709. #define EVE_CONFLIST        6L        /* Get conflist                                    */
  710. #define EVE_CONFIGUREBBS    7L        /* Set correct configuration on the bbs.    */
  711. #define EVE_SENDUSERINFO    8L        /* Send userinfo                                    */
  712. #define EVE_FORWARDMSG        9L        /* Forward a specific message                */
  713. #define EVE_GETNEWFILES        10L        /* Get new files listing                */
  714. #define EVE_DOCOMMAND        11L        /* Command the script should do        */
  715. #define EVE_AUTOLOGOFF        12L        /* Autologoff on next session            */
  716. #define EVE_RETRACTMSG        13L        /* Retract message from remote system            */
  717. #define EVE_RETRACTFILE        14L        /* Retract file from remote system            */
  718. #define EVE_REQUESTMSG        15L        /* Request message from remote system            */
  719. #define EVE_MAXEVENT        16L
  720.  
  721.  
  722. /*  User flags (Returned by RBRUSR_Flags tag)  */
  723. #define UDF_DELETED            (1<<0)    /* User is deleted                */
  724. #define UDF_UNRECOVERABLE    (1<<1)    /* User can not be undeleted    */
  725.  
  726.  
  727. /*  Kill flags (Returned by RBRK_Flags tag)  */
  728. #define KDF_DELETED            (1<<0)    /* Kill is deleted    */
  729. #define KDF_UNRECOVERABLE    (1<<1)    /* Kill can not be undeleted  */
  730. #define KDF_MARK_KEEP        (1<<2)    /* Mark message with MDF_KEEP if matched    */
  731. #define KDF_MARK_URGENT        (1<<3)    /* Mark message with MDF_URGENT if matched  */
  732. #define KDF_MARK_IMPORTANT    (1<<4)    /* Mark message with MDF_IMPORTANT if matched */
  733. #define KDF_MARK_DELETED    (1<<5)    /* Delete message if matched */
  734.  
  735. #define KDF_MARK_HAZE_BIT0    (1<<24)    /* Use KillHazeLevel macro to extract haze    */
  736. #define KDF_MARK_HAZE_BIT1    (1<<25)  /* level from kill flags.                            */
  737.  
  738. #define KillHazeLevel(killflags) ((killflags & (KDF_MARK_HAZE_BIT0 | KDF_MARK_HAZE_BIT1)) >> 24)
  739.  
  740.  
  741. /*  File flags (Returned by RBRF_Flags tag)  */
  742. #define FDF_DELETED            (1<<0)    /* File is deleted            */
  743. #define FDF_UNRECOVERABLE    (1<<1)    /* File is unrecoverable    */
  744.  
  745.  
  746.  
  747. /***********************************************************************
  748. *
  749. *  Search result structures and definitions.
  750. *
  751. */
  752.  
  753. struct SearchResult    /* Structure returned from SearchBRMessage()  */
  754. {
  755.     struct SearchResult *sr_NextResult;    /* Link to next SearchResult    */
  756.     ULONG sr_MsgsFound;        /* Number of messagenumbers in the buffer    */
  757.     ULONG *sr_Messages;        /* Buffer holding the messagenumbers        */
  758.                                     /* NULL-terminated.                                */
  759. };
  760.  
  761.  
  762. struct UserSuggestion    /* Structure returned from SearchBRUser()    */
  763. {
  764.     struct Node us_Node;        /* us_Node.ln_Name contains the name of the user    */
  765.     ULONG us_UserNr;            /* Number of user found                                        */
  766. };
  767.  
  768.  
  769. struct FoundFile
  770. {
  771.     ULONG ff_FileNr;                        /* Number of file found                                */
  772.     struct FAreaListItem *ff_FArea;    /* File area file belongs to. This is a list    */
  773.                                                 /* item from the SBRF_SearchFAreaList or the    */
  774.                                                 /* SBRF_SearchFArea.                                 */
  775. };
  776.  
  777. struct SFileResult    /* Structure returned by SearchBRFile()    */
  778. {
  779.     struct SFileResult *fr_NextResult;    /* Link to next SFileResult                    */
  780.     ULONG fr_FilesFound;                        /* Number of files in *this* SFileResult    */
  781.     struct FoundFile *fr_Files;            /* Buffer holding FoundFile structures        */
  782. };
  783.  
  784.  
  785. struct FoundUser
  786. {
  787.     ULONG fu_UserNr;        /* Number of user found                                            */
  788.     ULONG fu_FoundInTag;    /* In which tag the search string was found first in    */
  789. };
  790.  
  791. struct SUserResult    /* Structure returned by SearchBRUser()    */
  792. {
  793.     struct SUserResult *ur_NextResult;    /* Link to next SUserResult                    */
  794.     ULONG ur_UsersFound;                        /* Number of users in *this* SUserResult    */
  795.     struct FoundUser *ur_Users;            /* Buffer holding FoundUser structures        */
  796. };
  797.  
  798.  
  799.  
  800. /***********************************************************************
  801. *
  802. *  Structure returned with data about user.
  803. *
  804. */
  805.  
  806. struct UserData        /* Structure returned by BBSUserData()    */
  807. {
  808.     STRPTR ud_Name;
  809.     STRPTR ud_Street;
  810.     STRPTR ud_Address;
  811.     STRPTR ud_Country;
  812.      STRPTR ud_Phone;        /* May be NULL    */
  813. };
  814.  
  815.  
  816. /***********************************************************************
  817. *
  818. *  Structures passed to callback hooks.
  819. *
  820. */
  821. #define DEF_PROGRESS_UPDATES    100    /* Default progress callbacks on each pass    */
  822.  
  823. /* 
  824.     Prototype for the progress callback hook function should be: 
  825.  
  826.     ULONG __saveds __asm DoBRProgress(register __a0 struct Hook *hook, 
  827.         register __a2 struct BRProgress *progress, register __a1 APTR message);
  828.  
  829.     No messages defined yet. The messages parameter will always be NULL;
  830. */
  831.  
  832. struct BRProgress        /* Structure passed as object to the different progress callback hooks     */
  833. {
  834.     ULONG brp_Pass;        /* Some operations are done in more than one pass        */
  835.     ULONG brp_First;    /* First object in this pass.                                    */
  836.     ULONG brp_Last;        /* Last object in this pass.                                    */
  837.                         /* brp_First may be greater than brp_Last!                */
  838.     ULONG brp_Current;    /* Current object.                                                */
  839.     ULONG brp_Actions;    /* How many objects so far which has been altered.        */
  840.     ULONG brp_Skip;        /* How manu objects done between each call to the hook. (read only)    */
  841.     ULONG brp_LastPass; /* Is set to the value of brp_Pass had the last call to the hook.    */
  842.                         /* Will be 0 in the first call to the hook                                                    */
  843. };
  844.  
  845. /***********************************************************************
  846. *
  847. *  Methods used by GetMsgsSorted().
  848. *
  849. */
  850. #define BRGMS_REFERENCE            1    /* Sort the range by references                 */
  851. #define BRGMS_MINEFIRST            2    /* Sort messages to you first                     */
  852. #define BRGMS_ALLFIRST            3    /* Sort messages to all first                     */
  853. #define BRGMS_MSGNUMBER            4    /* Sort the range by messagenumbers             */
  854. #define BRGMS_SUBJECT            5    /* Sort the range by subject                     */
  855. #define BRGMS_SUBJECT_ALPHA        6    /* Sort the range by subject, alphabetically     */
  856. #define BRGMS_AUTHOR            7    /* Sort the range by author                     */
  857. #define BRGMS_AUTHOR_ALPHA        8    /* Sort the range by author, alphabetically        */
  858.  
  859. #endif /* LIBRARIES_BBSREAD_H */
  860.